Skip to content

Batch confirm members#549

Open
georgelgeback wants to merge 5 commits into
mainfrom
batch-confirm-members
Open

Batch confirm members#549
georgelgeback wants to merge 5 commits into
mainfrom
batch-confirm-members

Conversation

@georgelgeback

@georgelgeback georgelgeback commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Ready to be merged in!

Adds a new pre-registration member object to store email addresses, stil-id, and telephone numbers of people we know are members but who have not yet been registered as members on the website. This is really important for the frontend member admin pipeline to be as simple as possible. This does change a tiny portion of the schema of the user mangement system for better control of stil-id validation, but changes are minimal.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “pre-registration member” entity and admin API endpoints for managing known members (by email/stil-id/telephone) before they register on the site, plus centralizes and strengthens stil-id validation.

Changes:

  • Introduces PreregMember_DB + Pydantic schemas and a new /prereg-members router with CRUD + batch endpoints.
  • Adds test coverage for prereg-member routes and for invalid stil-id during /auth/register.
  • Refactors check_stil_id into a shared helper and adds Pydantic-level stil-id validation in user schemas.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/test_users.py Adds a registration test asserting invalid stil_id is rejected (422).
tests/test_prereg_members.py Adds end-to-end tests for prereg-member CRUD and batch behavior.
services/user.py Switches stil-id validation to the shared helper import.
routes/prereg_member_router.py New prereg-member API router (list/get/create/batch create/update/delete + batch delete).
routes/init.py Registers the prereg-member router under /prereg-members.
helpers/check_stil_id.py New shared stil-id validator helper.
db_models/prereg_member_model.py New prereg-member DB model + constraints.
api_schemas/user_schemas.py Adds reusable stil-id validator mixin used by UserCreate/UserUpdate.
api_schemas/prereg_member_schema.py New prereg-member request/response schemas.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread routes/prereg_member_router.py Outdated
Comment thread routes/prereg_member_router.py
Comment thread routes/prereg_member_router.py Outdated
Comment on lines +138 to +139
# Note: returns all existing prereg members that would collide unless they were skipped, not the newly created prereg members
return existing_prereg_members

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the frontend, we use the collision count to report collisions in a nice way back to the user. AFAIK we have never ever used returned rows to discover IDs in any part of the frontend, so I think it can be safely ignored.

Comment thread db_models/prereg_member_model.py Outdated
Comment thread tests/test_prereg_members.py
Comment thread api_schemas/user_schemas.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants